import React from 'react';
import {
  View,
  Text,
  StyleSheet,
  ScrollView,
} from 'react-native';

export const WorkbenchScreen: React.FC = () => {
  return (
    <View style={styles.container}>
      <View style={styles.header}>
        <Text style={styles.headerTitle}>工作台</Text>
      </View>
      <ScrollView style={styles.content}>
        <View style={styles.grid}>
          <View style={styles.gridItem}>
            <View style={styles.gridIcon}>
              <Text style={styles.gridIconText}>📋</Text>
            </View>
            <Text style={styles.gridText}>待办事项</Text>
          </View>
          <View style={styles.gridItem}>
            <View style={styles.gridIcon}>
              <Text style={styles.gridIconText}>📊</Text>
            </View>
            <Text style={styles.gridText}>数据统计</Text>
          </View>
          <View style={styles.gridItem}>
            <View style={styles.gridIcon}>
              <Text style={styles.gridIconText}>⚙️</Text>
            </View>
            <Text style={styles.gridText}>系统设置</Text>
          </View>
          <View style={styles.gridItem}>
            <View style={styles.gridIcon}>
              <Text style={styles.gridIconText}>📁</Text>
            </View>
            <Text style={styles.gridText}>文件管理</Text>
          </View>
        </View>
      </ScrollView>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#F5F5F5',
  },
  header: {
    backgroundColor: '#FFFFFF',
    paddingTop: 50,
    paddingBottom: 15,
    paddingHorizontal: 20,
    borderBottomWidth: 1,
    borderBottomColor: '#E0E0E0',
  },
  headerTitle: {
    fontSize: 22,
    fontWeight: 'bold',
    color: '#333',
  },
  content: {
    flex: 1,
    padding: 15,
  },
  grid: {
    flexDirection: 'row',
    flexWrap: 'wrap',
    justifyContent: 'space-between',
  },
  gridItem: {
    width: '48%',
    backgroundColor: '#FFFFFF',
    borderRadius: 8,
    padding: 20,
    marginBottom: 15,
    alignItems: 'center',
    shadowColor: '#000',
    shadowOffset: {
      width: 0,
      height: 2,
    },
    shadowOpacity: 0.1,
    shadowRadius: 4,
    elevation: 3,
  },
  gridIcon: {
    width: 60,
    height: 60,
    borderRadius: 30,
    backgroundColor: '#F0F8FF',
    justifyContent: 'center',
    alignItems: 'center',
    marginBottom: 10,
  },
  gridIconText: {
    fontSize: 30,
  },
  gridText: {
    fontSize: 14,
    color: '#333',
    fontWeight: '500',
  },
});

